function CombiColumnChart2(chartDiv,title,xaxisName,yaxisName,seriesMap,dataMap){
	this.chartDiv=chartDiv;
	this.title=title;
	this.xaxisName=xaxisName;
	this.yaxisName=yaxisName;
	this.dataMap=dataMap;
	this.seriesNameA ="";
	this.seriesNameB="";
	this.seriesMap = seriesMap;
	this.dataMap=dataMap;
	this.seriesNameArray ={};
	this.seriesProKeyArray={};
	this.numberSuffix="";
	this.showTotal = 0;
	this.type = 0;
	this.labelName="";
	this.toCompareQuality = false;
	this.toCompareArmor = false;
};

CombiColumnChart2.prototype.setNumberSuffix = function(numberSuffix){
	this.numberSuffix=numberSuffix;
};

CombiColumnChart2.prototype.setSeriesName = function(seriesNameA,seriesNameB){
	this.seriesNameA=seriesNameA;
	this.seriesNameB=seriesNameB;
};

CombiColumnChart2.prototype.setLabelName = function(labelName){
	this.labelName = labelName;
};

CombiColumnChart2.prototype.setKeyPattern = function(keyPattern){
	this.keyPattern = keyPattern;
};

CombiColumnChart2.prototype.seCompareQuality = function(bool){
	this.toCompareQuality = bool;
};

CombiColumnChart2.prototype.setCompareArmor = function(bool){
	this.toCompareArmor = bool;
};

CombiColumnChart2.prototype.setSeriesArray = function(seriesProKeyArray,seriesNameArray){
	this.seriesProKeyArray = seriesProKeyArray;
	this.seriesNameArray = seriesNameArray;
};


CombiColumnChart2.prototype.generateDataString2 = function(){
	this.chartString ="<chart caption='"+this.title+"' xaxisname='"+this.xaxisName+"' YAxisName='"+this.yaxisName+"' sNumberSuffix='%' baseFontSize='12' showValues='0' numberSuffix='"+this.numberSuffix+"' anchorRadius='5' lineThickness='2' formatNumber='0' formatNumberScale='0' palette='3'>";
	this.chartString +="<categories>";
	for(var i in this.seriesMap.keys()){
		var key = this.seriesMap.keys()[i];
		var label= this.seriesMap.get(key)+this.labelName;
		this.chartString+="<category label='"+label+"' />";
	}
	this.chartString +="</categories>";

	
	var seriesLenght = this.seriesProKeyArray.length;
	var showSeries = true;
	if(seriesLenght<1){
		showSeries = false;
	}
	for(var i = 0;i<seriesLenght;i++){
		  var seriesName = this.seriesNameArray[i];
		 
		  this.chartString +="<dataSet";
		  this.chartString+=" seriesName='"+seriesName+"'";
			this.chartString+=">";
			for(var j in this.seriesMap.keys()){
				var prokey = this.seriesProKeyArray[i];
				var key0 = this.seriesMap.keys()[j];
				var key = key0+"_"+prokey;
				//var linkString = "link='JavaScript:loadChart("+key0+","+this.seriesProKeyArray[i]+");'";
				var value = this.dataMap[key];
				if (value === undefined){
					value =0;
				}
	    		this.chartString+="<set value='"+value+"' />";
			}
		  this.chartString +="</dataSet>";
	    }

	this.chartString +="</chart>";
};

CombiColumnChart2.prototype.draw2 = function(){
	this.generateDataString2();
	var charStr = "../static/FusionCharts/ScrollColumn2D.swf";
	var chart = new FusionCharts(charStr, "ChartId", "726", "350", "0", "0");
    chart.setXMLData(this.chartString);
    chart.render(this.chartDiv);
};
